package com.haier.npt.security.domain;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

/**
 * @Description:TODO 
 * @author: lixu
 * @date:   2018年7月12日 下午5:16:12   
 */
@TableName("sys_permission")
public class SysPermission extends Model<SysPermission> {

    private static final Long serialVersionUID = 1L;

    /**
     * 主键 自增
     */
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 父编号
     */
	private Long pid;
    /**
     * 权限项标识
     */
	@TableField("permission_code")
	private String permissionCode;
    /**
     * 请求的方法GET或者POST
     */
	private String method;
    /**
     * 权限说明
     */
	private String name;
    /**
     * 类型（权限或者菜单）
     */
	private String type;
    /**
     * 地址
     */
	private String url;
    /**
     * 编号全路径 如/1/2/3/
     */
	@TableField("id_path")
	private String idPath;
    /**
     * 排序
     */
	private Integer sort;
    /**
     * 是否可用
     */
	private Boolean available;
    /**
     * 创建时间
     */
	private Date createdate;
    /**
     * 是否显示
     */
	private Boolean visible;

	private String serviceid;

	public SysPermission() {
	}

	public SysPermission(Long id, Long pid, String permissionCode, String method, String name, String type, String url, String idPath, Integer sort, Boolean available, Date createdate, String serviceid, String groupCode, Boolean visible) {
		this.id = id;
		this.pid = pid;
		this.permissionCode = permissionCode;
		this.method = method;
		this.name = name;
		this.type = type;
		this.url = url;
		this.idPath = idPath;
		this.sort = sort;
		this.available = available;
		this.createdate = createdate;
		this.visible = visible;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getPid() {
		return pid;
	}

	public void setPid(Long pid) {
		this.pid = pid;
	}

	public String getPermissionCode() {
		return permissionCode;
	}

	public void setPermissionCode(String permissionCode) {
		this.permissionCode = permissionCode;
	}

	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getIdPath() {
		return idPath;
	}

	public void setIdPath(String idPath) {
		this.idPath = idPath;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public Boolean isAvailable() {
		return available;
	}

	public void setAvailable(Boolean available) {
		this.available = available;
	}

	public Date getCreatedate() {
		return createdate;
	}

	public void setCreatedate(Date createdate) {
		this.createdate = createdate;
	}

	public Boolean isVisible() {
		return visible;
	}

	public void setVisible(Boolean visible) {
		this.visible = visible;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	

	public String getServiceid() {
		return serviceid;
	}

	public void setServiceid(String serviceid) {
		this.serviceid = serviceid;
	}

}
